home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Audio / Spectro / Source / Spectro.nib (.txt) < prev    next >
NeXT TypedStream Data  |  1992-01-22  |  23KB  |  464 lines

  1. typedstream
  2. StreamTable
  3.     HashTable
  4. Object
  5. [20c]
  6. typedstream
  7. [1738c]
  8. typedstream
  9.     HashTable
  10. Object
  11. WaterfallComputer
  12. HeaderClass
  13. %%%%i@@
  14. genericobject_nib
  15. mySignalProcessor
  16. myApp
  17. Spectro
  18. Application
  19. /usr/include/sys/message.h
  20. appnib
  21. windowTime
  22. totalSeconds
  23. loopButton
  24. windowType
  25.     numFrames
  26. myWaterfallView
  27. soundMeter
  28. myView
  29.     freqRange
  30. windowSize
  31. mySound
  32.     viewLimit
  33. stopButton
  34. fileName
  35. wfTimes
  36. zpFactor
  37. myWaterfallComputer
  38.     soundView
  39. goOnSelect
  40. hopTime
  41. currentPlot
  42. freqRange2
  43. frameSlider
  44. currentTime
  45.     beginTime
  46. play:
  47. changeTimeSetups:
  48.     willPlay:
  49. didPlay:
  50. knockItOff:
  51. didRecord:
  52. running:
  53. changeZPFactor:
  54. zoomIn:
  55. calculate:
  56. changeViewLimit:
  57. willRecord:
  58. showAll:
  59. frameChange:
  60. sliderChange:
  61. timeChange:
  62. setup:
  63. selectionChanged:
  64. record:
  65. load:
  66. stop:
  67. changeFreqMax:
  68. changeWindowSize:
  69. save:
  70. showSelection:
  71. zoomOut:
  72. SignalProcessor
  73. ScrollingSound
  74. viewnib
  75. FirstResponder
  76. firstnib
  77. checkSpelling:
  78. alignSelCenter:
  79.     unscript:
  80. pasteFont:
  81. runPageLayout:
  82. superscript:
  83. copyRuler:
  84.     copyFont:
  85. selectAll:
  86. pasteRuler:
  87. toggleRuler:
  88. showGuessPanel:
  89. alignSelLeft:
  90. paste:
  91. performClose:
  92. arrangeInFront:
  93. subscript:
  94. copy:
  95. alignSelRight:
  96. delete:
  97. orderFrontColorPanel:
  98. underline:
  99. performMiniaturize:
  100. SpectrumView
  101.     freqField
  102. ampField
  103. printMyPSCode:
  104. WaterfallView
  105. plotHeight
  106. myMax
  107. myMin
  108. [21067c]
  109. typedstream
  110.     HashTable
  111. Object
  112. Bitmap
  113. Spectro
  114. iii00
  115. [576c]
  116. NibData
  117. @@@@s
  118. Storage
  119. {*@@}
  120. [120{*@@}]
  121. File's Owner
  122. CustomObject
  123.     InfoPanel
  124. WindowTemplate
  125. ffffZ
  126. iiii***@s@
  127. Panel
  128.     Responder
  129.     TextField
  130. Control
  131. TextFieldCell
  132. ActionCell
  133.     Helvetica
  134. Version 2.497
  135. Jan., 1992
  136. by Perry R. Cook
  137. Button
  138. ButtonCell
  139. =Stanford Center for Computer 
  140. Research in Music and Acoustics
  141. A Spectrum Analysis Tool
  142. Button1
  143. Field1
  144. Field2
  145. VersionNumber
  146. Field
  147. Field3
  148. MainMenu
  149. MenuTemplate
  150. *@*@ccc
  151. Matrix
  152. @:@iiii
  153. [11@]
  154. MenuCell
  155. Info...
  156. Paste
  157. Select All
  158. ff@@#::s
  159. submenuAction:
  160.     menuArrow
  161. Spectrum
  162. Capture
  163.     Waterfall
  164. PrintWF
  165. PrintSP
  166.     MenuItem1
  167. 'Real Time (so called) Spectrum Analyzer
  168. Window
  169. 0 Hz.
  170. 1000 Hz.
  171. 2000 Hz.
  172. 3000 Hz.
  173. 4000 Hz.
  174. -15 dB
  175. -30 dB
  176. -45 dB
  177. -60 dB
  178. FormCell
  179. Freq. of Cursor Position:
  180. Field:
  181. Ampl. of Cursor Position:
  182.     FreqRange
  183. Helvetica-Bold
  184. Hanning
  185. Window Type:
  186. Window Size:
  187. Zero Pad Factor (>=1):
  188. N(Options: Rectangular,Triangular,Hamming, 
  189. Hanning,Blackman3,Blackman4,Kaiser)
  190. 0.03195
  191. Window Time:
  192. 0.01598
  193. HopTime:
  194. Selection Time:
  195. Selection Begin:
  196. Number of Frames to Process:
  197. 2These are your controls over the spectrum analysis
  198. dBRangeS
  199. Sine Error at Cursor:
  200. CustomView
  201. SpectrumView
  202. Title
  203. Stop!
  204. Field4(
  205. Matrix1,
  206. Form6:
  207. Freq. of Cursor Position<:
  208. Ampl. of Cursor PositionGF
  209. Form3cU
  210. Window Sizedc
  211. Form4mU
  212. Zero Pad Factor (>=1)nm
  213. Form2YU
  214. Window TypeZY
  215. Window Time}|
  216. HopTime
  217. Form5
  218. Selection Time
  219. Form7
  220. Selection Begin
  221. Form1
  222. Number of Frames to Process
  223. Sine Error at Cursor
  224. Matrix2
  225. SignalProcessor
  226. 'Waterfall Plot (Active if # Frames > 1)
  227. [10@]
  228. Slider
  229. SliderCell
  230. Current Cursor Time:
  231. Current Plot #:
  232. Select Plot--^
  233. Individual Plot Height (>1):
  234. WaterfallView
  235. 0.000
  236. MinTimeS
  237. MaxTimeS
  238. Slider1
  239. Current Cursor Time
  240. Current Plot #
  241. Individual Plot Height (>1)
  242. Spectro Help
  243. ScrollView
  244. ClipView
  245. ciifffcfffs
  246. [8380c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
  247. \margl40
  248. \margr40
  249. {\colortbl\red0\green0\blue0;}
  250. \f0\b\i0\ul0\ql\fs36\fi0\li0\gray0\up0\dn0                                      Spectro Help
  251. \b0 \
  252. \fs24 \
  253. Welcome to Spectro, a spectrum analysis application for the NeXT.  Direct bugs/suggestions in large groups (save up a few before you mail) to Perry R. Cook prc@ccrma.stanford.edu.  The program performs frequency transforms on sound data and displays the resultant spectrum.  This is similar to passing light through a prism, which splits it into its component colors.  To really use and understand all of the features of this program, you should take Julius Smith's sequence in digital signal processing for music offered at CCRMA.  Optionally, you might read Xavier Serra's PhD. dissertation available from CCRMA. \
  254. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b\fs36                                      Sound Capture
  255. \b0 \
  256. \fs24 \
  257. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc0 The 
  258. \b Soundfile Capture Window
  259. \b0  controls a single sound.  You can record into the sound from the CODEC port by pressing the 
  260. \b Record
  261. \b0  button.  Recording is indicated by the sound meter above the sound view, and can be stopped by pressing the 
  262. \b Stop
  263. \b0  button.  After recording, the view shows the new sound.  You can play the file by pressing 
  264. \b Play
  265. \b0 , and the playing process can be aborted by pressing 
  266. \b Stop
  267. \b0 .\
  268. You can load a previously generated sound file by typing the file name (with complete file path) into the 
  269. \b FileName:
  270. \b0  field, and pressing the 
  271. \b Load
  272. \b0  button or hitting carriage return in the 
  273. \b FileName: 
  274. \b0 field.  
  275. \b Save
  276. \b0  saves the current sound to the file specified in 
  277. \b FileName:
  278. \b0 .  It is important to remember that the soundfile specified by 
  279. \b FileName:
  280. \b0  is not necessarily the current sound.  The current sound can be modified by recording, editing, or by loading from a file.  If the current sound is modified by recording or editing, it will not match the file from which it was loaded.\
  281. The sound can be viewed in the sound view.   If the sound is larger than the view, a scroll slider appears at the bottom of the view, and you can use it to scan across the sound.  Pressing the 
  282. \b All
  283. \b0  button causes the view to display the entire sound.  
  284. \b ZoomIn
  285. \b0  and 
  286. \b ZoomOut
  287. \b0  zooms the display, and 
  288. \b Select
  289. \b0  zooms the display to the selected piece of the sound (see below).\
  290. By dragging over the sound in the window, a piece of the sound is selected and is displayed in grey.  The entire sound can be selected by using the 
  291. \b Select All
  292. \b0  command under 
  293. \b Edit
  294. \b0  in the main menu.  The selected portion can be copied or cut using the commands under 
  295. \b Edit
  296. \b0  in the main menu, or by using the <command> key arguments.  Once a piece is cut or copied, it can be pasted to any area within the sound, or even to another sound window.  The sound segment is pasted wherever the cursor is located, and if a selection is made, the selection is replaced by the segment which is in the cut/copy buffer.\
  297. An important recommended operation is to remove any silence at the beginning and end.  This makes signal processing easier later.  Once you are happy with your captured sound, you can perform spectrum analysis on it.\
  298. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b\fs36                                      Spectrum Analysis
  299. \b0 \
  300. \fs24 \
  301. \pard The defaults get you reasonable speech spectrum analysis at the CODEX rate of 8012 Hz.\
  302. \b Window Size 
  303. \b0 determines how much data is processed.  
  304. \b Window Time
  305. \b0  tells you how long this is in seconds.
  306. \b   Zero Padding Factor
  307. \b0  is a multiplier on the 
  308. \b Window Size
  309. \b0  which determines the size of the transform.  Frequency transforms in this program are restricted (for now) to powers of four, so if you pick a 
  310. \b Window Size
  311. \b0  of 257, the 
  312. \b Zero Padding Factor
  313. \b0  is automatically set to 3.984436 to yield a transform size of 1024.  You can explicitly set the 
  314. \b Zero Padding Factor
  315. \b0  to something greater than one for reasons which I will not explain here.  
  316. \b # Frames
  317. \b0  is a positive integer which determines how many windows of data are processed.  If 
  318. \b # Frames
  319. \b0  is greater than one, the window is `hopped' through the signal so that adjacent windows overlap by a factor of two.  The 
  320. \b Hop Time
  321. \b0  field tells you the time between adjacent analysis windows.  
  322. \b Total Time
  323. \b0  tells you the length of the entire event that you can process.  
  324. \b Window Type
  325. \b0  selects the window used for smoothing the data. I will discuss this no more except to say that if you want to see the effects of different windows, try a simple whistle at one frequency and process it with different windows.\
  326. Dragging over a section of the sound in the SoundView causes many of the fields to update.  This is the spectrum analyzer calculating and displaying the time of the section that will be analyzed.  
  327. \b GO!
  328. \b0  causes the region selected in the SoundView to be transformed to the frequency domain and displayed.  If you select 
  329. \b Go On Select
  330. \b0  in the 
  331. \b SoundFile Capture
  332. \b0  window, the spectrum analyzer will recalculate and display the spectra each time you make a new selection in the sound view.  The 
  333. \b Stop!
  334. \b0  button stops the processing.\
  335. \b # Frames
  336. \b0  is one or less (if you select a very small amount of the sound view), the frequency domain data is displayed in one frame in the 
  337. \b Real Time Spectrum Analyzer
  338. \b0  window.  Typing a negative number into the 
  339. \b dBRange 
  340. \b0 field changes the scale of the display.  The plots are always referenced to 0 dB = maximum a sound can be, so by typing in the floor as a negative number, you set the range.  Pointing to the display causes a cursor to appear and follow the mouse.  This cursor causes the 
  341. \b\fc0 Frequency of Cursor Position 
  342. \b0 and
  343. \b  Amplitude of Cursor Position
  344. \b0  fields to display the frequency and amplitude of the spectrum at the cursor location.  
  345. \b Sinusoidal `Error' at cursor
  346. \b0  does nothing at the moment, but holds great promise for helping you interpret peaks in the spectrum in the future.\
  347. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b # Frame
  348. \pard s 
  349. \b0  is greater than one, the data is displayed in the 
  350. \b Waterfall Plot
  351. \b0  view, with increasing time running upward.  Don't be confused by the display, the plots are drawn from top to bottom, which is actually reverse time (it's easier to do hidden line removal this way, not your problem, mine).  The slider at the right of the 
  352. \b Waterfall Plot
  353. \b0  window allows you to select an individual spectrum for display in the 
  354. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b Real Time Spectrum Analyzer
  355. \b0  window
  356. \pard .  The time corresponding to the selected spectrum is printed in the 
  357. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\b\fc0 Current Time of Slider/Cursor
  358. \pard\b0\fc0  field.  Changing the 
  359. \b FreqRange
  360. \b0  of the 
  361. \b Real Time Spectrum Analyzer
  362. \b0  view causes the 
  363. \b Waterfall Plot
  364. \b0  to redraw all spectra.  
  365. \b Individual Plot Height
  366. \b0  causes the individual plots in the waterfall view to be drawn scaled by that amount.  If 
  367. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b\fc0 Individual Plot Height
  368. \pard\fc0  
  369. \b0 = 1, no plot will draw over another.  \
  370. \b Run
  371. \b0  in the 
  372. \b SoundFile Capture
  373. \b0  window (
  374. \b THIS BUTTON IS BROKEN IN VERSION 2.0 FOR NOW!!!!) 
  375. \b0 causes the 
  376. \b Real Time Spectrum Analyzer
  377. \b0  window to calculate and display spectra continuously.  
  378. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc0 \
  379. \pard\fc0 \
  380. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\b\fs36 Coming in the Future\
  381. \fs32 \
  382. \b0\fs24 1.    Less bugs\
  383. 2.    More features, so new bugs\
  384. 3.    Real time spectrum analysis (Run mode).\
  385. 4.    DSP port mic support (I hope to support CODEX, 44.1 and 22.05 KHz mono or stereo for     processing, and make the DSP do the conversion on the fly, summing both channels     and doing sampling rate conversion to yield the 22.05 kHz file).\
  386. 5.    Help in interpreting features in the spectrum.\
  387. NXCursor
  388. NXImage
  389. NXibeam
  390. Scroller
  391. _doScroller:
  392. @@@ffs
  393. ScrollingText
  394. Soundfile Capture
  395. Cont.
  396. ScrollingSound
  397. SoundMeter
  398. ZoomIn
  399. ZmOut
  400. Select
  401. /tmp/test.snd
  402.     FileName:
  403. Record
  404. Go on
  405. Select
  406. NXswitch
  407.     NXswitchH
  408. Matrix4
  409. FileName
  410.     On Select
  411. {i*@@@}
  412. [61{i*@@@}]
  413. terminate:
  414. makeKeyAndOrderFront:
  415. copy:
  416. paste:
  417. selectAll:
  418. myView
  419. windowType
  420. windowSize
  421. zpFactor
  422. mySignalProcessor
  423. myWaterfallView
  424. changeViewLimit:6
  425.     viewLimit
  426. sliderChange:
  427. currentTime
  428.     freqField
  429. ampField
  430. currentPlot
  431. play:
  432. stop:
  433. load:
  434. save:
  435. zoomIn:
  436. zoomOut:
  437. showSelection:
  438. showAll:
  439.     soundView
  440. soundMeter
  441. fileName
  442. performClick:
  443. calculate:
  444. frameSlider
  445. changeZPFactor:m
  446.     freqRange
  447. changeFreqMax:(
  448. plotHeight
  449. printMyPSCode:
  450. hide:
  451. hopTime
  452. windowTime
  453. totalSeconds
  454.     numFrames
  455.     beginTime
  456. timeChange:
  457. frameChange:
  458. goOnSelect
  459. record:
  460. wfTimes
  461. freqRange2
  462. changeWindowSize:d
  463. stopButton
  464.